// form表单配置
export const lessonFormConfig = {
  pageName: 'course',
  // 下拉框的选项，isFuzzyQuery是否为模糊查询选项
  selectOptions: [
    { label: '课程名称', value: 'course_name', isFuzzyQuery: true },
    { label: '教师名称', value: 'teacher_name', isFuzzyQuery: true },
    { label: '所属学院', value: 'college_name', isFuzzyQuery: true },
    { label: '所属专业', value: 'major_name', isFuzzyQuery: true }
  ]
}

// table表格配置
export const lessonTableProps = {
  pageName: 'course',
  moduleName: 'lessonManageModule',
  tableColumnProps: [
    { prop: 'course_name', label: '课程名称', width: 150, slotName: 'course_name' },
    { prop: 'teacher_name', label: '授课教师' },
    { prop: 'major_name', label: '所属专业', width: 120 },
    { prop: 'college_name', label: '所属学院', width: 120 },
    { prop: 'credit', label: '学分', width: 70 },
    { prop: 'lesson_period', label: '课时', width: 70 },
    // { prop: 'num_limit', label: '选课限制人数' },
    { prop: 'location', label: '上课地点' },
    // { prop: 'time_2', label: '上课时间1'},
    // { prop: 'time_2', label: '上课时间2'},

    { prop: 'type', label: '课程类型', slotName: 'type', width: 100 },
    { prop: 'choose_limit', label: '选课限制', width: 80, slotName: 'choose_limit' },
    { prop: 'state', label: '课程状态', slotName: 'state' },
    { prop: 'handle', label: '操作', width: 150, slotName: 'handle' }
  ],
  storeMommand: {
    pageListGetterName: ''
  }
}

// 表单对话框配置
export const lessonModelConfig = {
  pageName: 'course',
  moduleName: 'lessonManageModule',
  formItems: [
    {
      field: 'course_name',
      type: 'input',
      label: '课程名称',
      placeholder: '请输入课程名称',
      rules: [{ required: true, message: '课程名称不能为空!', trigger: 'blur' }]
    },
    {
      field: 'credit',
      type: 'select',
      label: '课程学分',
      placeholder: '请输入课程学分',
      options: [
        { title: 1, value: 1 },
        { title: 2, value: 2 },
        { title: 3, value: 3 },
        { title: 4, value: 4 },
        { title: 5, value: 5 },
        { title: 6, value: 6 }
      ],
      rules: [{ required: true, message: '课程学分不能为空!', trigger: 'blur' }]
    },
    {
      field: 'location',
      type: 'input',
      label: '上课地点',
      placeholder: '请输入上课地点',
      rules: [{ required: true, message: '上课地点不能为空!', trigger: 'blur' }]
    },
    {
      field: 'num_limit',
      type: 'input',
      label: '限制人数',
      placeholder: '请输入人数限制',
      rules: [{ required: true, message: '限制人数不能为空!', trigger: 'blur' }]
    },
    {
      field: 'lesson_period',
      type: 'input',
      label: '课程学时',
      isInt: true,
      placeholder: '请输入课程学时',
      rules: [{ required: true, message: '课程学时不能为空!', trigger: 'blur' }]
    },
    {
      field: 'time_1',
      type: 'cascader',
      label: '上课时间1',
      placeholder: '请输入上课时间1',
      props: { expandTrigger: 'hover' },
      options: [],
      rules: [{ required: true, message: '上课时间1不能为空!', trigger: 'blur' }]
    },
    {
      field: 'time_2',
      type: 'cascader',
      label: '上课时间2',
      placeholder: '请输入上课时间2',
      props: { expandTrigger: 'hover' },
      options: [],
      rules: [{ required: true, message: '上课时间2不能为空!', trigger: 'blur' }]
    },

    {
      field: 'type',
      type: 'select',
      label: '课程类型',
      placeholder: '请选择课程类型',
      options: [
        { title: '主修', value: 1 },
        { title: '选修', value: 2 },
      ],
      rules: [{ required: true, message: '课程类型不能为空!', trigger: 'blur' }]
    },
    {
      field: 'choose_limit',
      type: 'select',
      label: '课程限制',
      placeholder: '请选择课程限制',
      options: [
        { title: '同院系', value: 1 },
        { title: '同专业', value: 2 },
        { title: '无限制', value: 3 },
      ],
      rules: [{ required: true, message: '课程限制不能为空!', trigger: 'blur' }]
    },
    {
      field: 'major_name',
      type: 'cascader',
      label: '所属专业',
      placeholder: '请选择所属专业',
      props: { expandTrigger: 'hover' },
      options: [],
      rules: [{ required: true, message: '所属专业不能为空!', trigger: 'blur' }]
    },
  ],
  labelWidth: '90px',
  colLayout: { span: 24 },
  itemStyle: { padding: '0px 30px' }
}
